﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LightCAD.UI
{
    public class UIManager
    {
        public static UIManager Instance { get; private set; }
        public static void Initilize(MainWindow window)
        {
            var uiMgr = new UIManager(window);
            uiMgr.SideBar.Initilize();
            Instance = uiMgr;
        }

        private UIManager(MainWindow window)
        {
            this._window = window;
        }
         
        private MainWindow _window;
        public MainWindow Window => _window;


        private SideBarManager _sideBar;
        public SideBarManager SideBar
        {
            get {
                if (_sideBar == null)
                {
                    _sideBar = new SideBarManager(_window);
                }
                return _sideBar;
            }
        }

        private IconBarManager _iconBar;
        public IconBarManager IconBar
        {
            get
            {
                if (_iconBar == null)
                {
                    _iconBar = new IconBarManager(_window);
                }
                return _iconBar;
            }
        }
        private ToolBarManager _toolBar;
        public ToolBarManager ToolBar
        {
            get
            {
                if (_toolBar == null)
                {
                    _toolBar = new ToolBarManager(_window);
                }
                return _toolBar;
            }
        }

        private MenuBarManager _menuBar;
        public MenuBarManager MenuBar
        {
            get
            {
                if (_menuBar == null)
                {
                    _menuBar = new MenuBarManager(_window);
                }
                return _menuBar;
            }
        }
    }
}
